package com.zxjbyte.yiyi.framework.tenant.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Collections;
import java.util.Set;

/**
 * @Author zhangxingjia
 * @Date 2023/3/14 18:41
 * @Version: 1.0
 */
@Getter
@Setter
@ConfigurationProperties(prefix = TenantProperties.TENANT_PROP_PREFIX)
public class TenantProperties {

    public static final String TENANT_PROP_PREFIX = "yiyi.tenant";

    /**
     * 租户是否开启
     */
    private Boolean enabled = Boolean.TRUE;

    /**
     * DB租户字段
     */
    private String column = "tenant_id";

    /**
     * 是否开启注解排除
     */
    private Boolean annotationExclude = Boolean.FALSE;

    /**
     * 需要排除进行自定义的多租户表
     */
    private Set<String> excludeTables = Collections.emptySet();

}
